Colin Walters [Tue, 9 Aug 2016 17:52:43 +0000 (13:52 -0400)]
tests: Port sysroot.js away from libgsystem
My case-sensitive `git grep` didn't find this one originally,
but the Travis+Debian setup was configured to run it.
Closes: #451
Approved by: jlebon
Colin Walters [Tue, 9 Aug 2016 16:51:30 +0000 (12:51 -0400)]
travis: Disable email notifications
I'm getting spammed. We'll see the results in the status.
Closes: #450
Approved by: jlebon
Colin Walters [Thu, 23 Jun 2016 00:12:31 +0000 (20:12 -0400)]
Final excision of libgsystem dependency
Lots and lots of preparation led to this moment - when nothing
apparent changes for users! Woo!
But seriously, having the extra dependency is a minor annoyance, and
in the big picture I think the libgsystem idea was wrong - we need to
land things in GLib, and use git submodules for API-unstable or
Linux-specific sharing. For a lot of OSTree, the libgsystem `GFile*`
orientation was also wrong, we really want fd-relative.
Closes: #444
Approved by: jlebon
Colin Walters [Mon, 8 Aug 2016 19:41:09 +0000 (15:41 -0400)]
prune: Retain the tip of each ref even with date pruning
I hit an error with [CAHC](https://wiki.centos.org/SpecialInterestGroup/Atomic/Devel)
where we were doing time-based pruning. `ostree summary -u` started failing,
and it took me a bit to realize it was because we were pruning
even the tip of old branches, which I was not at all expecting,
and I don't think users will too.
Perhaps in the future we could add some sort of --prune-ref-tips or
something if people wanted it, but I doubt it.
Closes: #445
Approved by: jlebon
Colin Walters [Tue, 9 Aug 2016 00:19:54 +0000 (20:19 -0400)]
build: Update .gitignore
The patch to add more symlink bits also needed CLEANFILES updates.
Closes: #446
Approved by: jlebon
Colin Walters [Thu, 4 Aug 2016 13:37:26 +0000 (09:37 -0400)]
deploy: Use internal recursive copy rather than libgsystem
Since we already had a "recursive copy" implementation here, let's
reuse it rather than the libgsystem `gs_shutil_cp_a()`. Part of the
libglnx porting.
Closes: #428
Approved by: jlebon
Colin Walters [Thu, 4 Aug 2016 01:24:09 +0000 (21:24 -0400)]
deploy: Port file copying code to GLnxDirFdIterator
It handles ownership of the `DIR*` for us more cleanly, and
is just a better API.
This is in preparation for further changes to this code to do SELinux
labeling while copying.
Closes: #428
Approved by: jlebon
Colin Walters [Mon, 8 Aug 2016 10:34:50 +0000 (06:34 -0400)]
repo: Fix an uninitialized variable
Closes: #431
Approved by: giuseppe
Colin Walters [Thu, 4 Aug 2016 20:58:07 +0000 (16:58 -0400)]
build: Make -Werror=int-conversion fatal
This should hopefully avoid me accidentally passing NULL for an `int`
file descriptor in the future.
Closes: #431
Approved by: giuseppe
Colin Walters [Thu, 4 Aug 2016 20:47:46 +0000 (16:47 -0400)]
build: Import attributes.m4, detect CFLAGS at build time
I want to add `-Werror=int-conversion`, but it's only available in
newer GCC versions. So let's start autodetecting available compiler
flags.
Closes: #431
Approved by: giuseppe
Colin Walters [Fri, 5 Aug 2016 11:08:14 +0000 (07:08 -0400)]
repo: Drop more internally unused GFile members
I forgot to actually remove `config_file` in the previous
commit, the txn lock hasn't been used in a long time, and
for the uncompressed cache, everything uses the fd already.
Closes: #433
Approved by: giuseppe
Simon McVittie [Fri, 5 Aug 2016 21:12:55 +0000 (22:12 +0100)]
travis: run the test suite on various distributions
.travis.yml is obviously still Travis-specific, but tests/ci-* are
designed to be shareable with other CI environments if there is interest
in doing so.
At the moment I'm only testing on Debian and Ubuntu. In principle we
could try a non-Debian-derived Docker container such as Fedora or CentOS
inside travis-ci's Ubuntu environment, similar to what I'm doing
for Debian, but I don't know the correct setup commands to use there.
Closes: #438
Approved by: cgwalters
Colin Walters [Fri, 5 Aug 2016 20:30:13 +0000 (16:30 -0400)]
.travis.yml: Delete, we aren't using it right now
@smcv will re-add a new version.
Closes: #439
Approved by: smcv
Simon McVittie [Fri, 5 Aug 2016 19:41:05 +0000 (20:41 +0100)]
Skip tests that use whiteouts under Docker/aufs
ostree's naming convention for whiteouts is similar to what is
done in aufs, which means we can't compose the trees to test this
feature under Docker with the aufs storage driver, as used on
travis-ci.
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #437
Approved by: cgwalters
Simon McVittie [Fri, 5 Aug 2016 13:38:34 +0000 (14:38 +0100)]
Update libglnx: Add missing files to libglnx distribution
This fixes distcheck.
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #436
Approved by: cgwalters
Colin Walters [Fri, 5 Aug 2016 01:49:05 +0000 (21:49 -0400)]
repo: Drop internal GFile config_file
The remote parsing code still uses GFiles but this is a start.
Closes: #432
Approved by: giuseppe
Colin Walters [Fri, 5 Aug 2016 01:31:39 +0000 (21:31 -0400)]
lib: Drop GFiles for self->{objects_dir,state_dir}
Everything that used to reference these is now fd-relative.
Closes: #432
Approved by: giuseppe
Colin Walters [Fri, 5 Aug 2016 01:30:56 +0000 (21:30 -0400)]
repo: Port metadata writing code to fd-relative
It was the last thing referencing `self->objects_dir`.
Closes: #432
Approved by: giuseppe
Colin Walters [Thu, 4 Aug 2016 20:35:49 +0000 (16:35 -0400)]
lib: Fix a compiler warning introduced from earlier patch
I think we'd end up closing stdin...yuck. Need to investigate
having this be fatal, but CentOS 7 `gcc-4.8.5` doesn't understand
`-Werror=int-conversion`.
Closes: #430
Approved by: giuseppe
Colin Walters [Thu, 4 Aug 2016 17:29:13 +0000 (13:29 -0400)]
lib: Use libglnx file replace API more consistently
We have a better API now, drop use of the internal helper, which also
depended on libgsystem.
This required bumping libglnx to pull in a fix.
Closes: #429
Approved by: giuseppe
Colin Walters [Wed, 3 Aug 2016 17:16:30 +0000 (13:16 -0400)]
Update libglnx for O_TMPFILE build time option
See: https://github.com/ostreedev/ostree/issues/421
Closes: #426
Approved by: gatispaeglis
Colin Walters [Thu, 4 Aug 2016 11:22:41 +0000 (07:22 -0400)]
lib: Add padding booleans to OstreeRepoCheckoutAtOptions
Since this is a new API, and adding booleans is the most likely thing
we'll do, let's stick some explicit padding for them in here now.
We could use the `unused_ints[]` but it'd be out of order, and this
will more clearly remind people about the padding. The efficiency hit
versus bitfields is annoying, but oh well, not a real world problem.
Closes: #427
Approved by: giuseppe
Colin Walters [Wed, 3 Aug 2016 14:55:35 +0000 (10:55 -0400)]
repo: Flip the fsync default to off for new checkout API
Since we're adding a new API, we have the opportunity to fix
the defaults. We expect clients to do a `syncfs()` or equivalent
on their own now, since it's way more efficient.
Flip the checkout fsync default to off.
Closes: #425
Approved by: giuseppe
Colin Walters [Tue, 2 Aug 2016 18:49:42 +0000 (14:49 -0400)]
deltas: Port compilation to libglnx/fd-relative
This was the last use of libgsystem tmpfile APIs. The change here is
a bit uglier than it needs to be because we support creating the delta
in place as well as in the repo, so we needed to abstract over
locations.
Closes: #424
Approved by: giuseppe
Colin Walters [Mon, 1 Aug 2016 01:31:45 +0000 (21:31 -0400)]
grub2: Port away from gs_file_sync_data()
Inlining this is uglier, but this code kind of sucks anyways =( We're
going to need to do some fd-relative porting in here at some point.
Closes: #424
Approved by: giuseppe
Colin Walters [Mon, 1 Aug 2016 01:33:15 +0000 (21:33 -0400)]
lib: Port away from gs_file_rename()
In one case, we already had relative fds and hence this was
nicer. Unfortunately the other areas got uglier. More fd-relative
porting to do later.
Closes: #424
Approved by: giuseppe
William Manley [Sun, 31 Jul 2016 21:19:13 +0000 (22:19 +0100)]
ostree-prepare-root: Add test that overlayfs over /usr works.
Closes: #403
Approved by: cgwalters
William Manley [Tue, 26 Jul 2016 17:05:25 +0000 (18:05 +0100)]
ostree-prepare-root: Fix typo in error message
Closes: #403
Approved by: cgwalters
William Manley [Tue, 26 Jul 2016 16:53:53 +0000 (17:53 +0100)]
ostree-prepare-root: Make error message capitalisation consistent
There seemed to be more lower case first letters so I've standardised
on that.
Closes: #403
Approved by: cgwalters
William Manley [Tue, 19 Jul 2016 18:48:23 +0000 (19:48 +0100)]
ostree-prepare-root: Use pivot_root if real sysroot is already mounted at /
This allows ostree-prepare-root outside of the initramfs context where the
real rootfs is already mounted at /. We can't use `mount --move` in this
case because we would be trying to move / into a subdirectory of itself.
Closes: #403
Approved by: cgwalters
William Manley [Mon, 18 Jul 2016 17:09:10 +0000 (18:09 +0100)]
Refactor ostree-prepare-root: Perform chdir to deploy directory earlier
...for simplicity. This way we don't need to keep concatenating
deploy_path to everything. We can just refer relative to the current
working directory.
We need to do this after bind-mounting it over itself otherwise our cwd
is still on the non-bind-mounted filesystem below.
Closes: #403
Approved by: cgwalters
William Manley [Mon, 18 Jul 2016 17:02:12 +0000 (18:02 +0100)]
ostree-prepare-root: Refactor: Create /sysroot.tmp much later
Typically we have our ready made-up up root at
`/sysroot/ostree/deploy/.../` (`deploy_path`) and the real rootfs at
`/sysroot` (`root_mountpoint`). We want to end up with our made-up root
at `/sysroot/` and the real rootfs under `/sysroot/sysroot` as systemd
will be responsible for moving `/sysroot` to `/`.
We need to do this in 3 moves to avoid trying to move `/sysroot` under
itself:
1. `/sysroot/ostree/deploy/...` -> `/sysroot.tmp`
2. `/sysroot` -> `/sysroot.tmp/sysroot`
3. `/sysroot.tmp` -> `/sysroot`
This is a refactoring to group all these operations together so I can
implement an alternative in terms of `pivot_root`.
Closes: #403
Approved by: cgwalters
William Manley [Mon, 18 Jul 2016 16:44:19 +0000 (17:44 +0100)]
ostree-prepare-root: Cope with /proc not being mounted
When trying to read kernel command-line.
Closes: #403
Approved by: cgwalters
William Manley [Mon, 18 Jul 2016 16:03:11 +0000 (17:03 +0100)]
ostree-prepare-root as init: exec init from deployment if run as PID1
This supports running ostree on embedded platforms without an initrd.
Specificially I'm trying to do bringup on an NVidia Tegra based Jetson TK1
dev board.
Closes: #403
Approved by: cgwalters
William Manley [Mon, 18 Jul 2016 13:42:40 +0000 (14:42 +0100)]
ostree-prepare-root: Refactor code to resolve deploy_path
I'll reuse this for a new ostree-init.
Closes: #403
Approved by: cgwalters
William Manley [Wed, 27 Jul 2016 15:40:05 +0000 (16:40 +0100)]
tests: Add basic tests for ostree-prepare-root
These tests use unshare and mount to prepare a fake initrd/early boot
directory structure so we can then test ostree-prepare-root.
Things that are tested:
* Running in an initrd environment
* Running without initrd
* /var and /sysroot being mounted correctly
* /usr being mounted read-only
Things not tested (yet):
* Running as init - this could be accomplished by unsharing the pid
namespace too.
* mounting/unmounting `/proc` if `/proc/cmdline` isn't available
* Persistent overlayfs for `/usr`
* Probably other things
The tests are basic but can be extended in the future as we do more work
on `ostree-prepare-root`.
These tests must be run as root as they require the ability to `mount`
and to `unshare` the mount namespace. Perhaps in the future we can use
user namespaces for this test once they are more widely available.
Closes: #403
Approved by: cgwalters
Colin Walters [Mon, 1 Aug 2016 00:50:07 +0000 (20:50 -0400)]
repo: Port to g_autoptr() rather than old style cleanup macros
This notably kills a few libgsystem uses here.
Closes: #423
Approved by: giuseppe
Colin Walters [Mon, 1 Aug 2016 00:58:32 +0000 (20:58 -0400)]
repo: Port sign_data() to libglnx tmpfile APIs
Part of dropping libgsystem.
Closes: #423
Approved by: giuseppe
Colin Walters [Mon, 1 Aug 2016 01:03:16 +0000 (21:03 -0400)]
deploy: Replace a use of gs_file_enumerator with compat wrapper
More libglnx/glib porting.
Closes: #423
Approved by: giuseppe
Colin Walters [Mon, 1 Aug 2016 14:43:49 +0000 (10:43 -0400)]
repo: Make ostree_repo_create() nonfatal on existing repos
In general we want to support "idempotentcy" or "state
synchronization" across interruption. If a repo is only partially
created due to a crash or whatever, it's hard for a user to know that.
Let's just make `ostree_repo_create()` idempotent. Since all we're
doing is a set of `mkdirat()` invocations, it's quite simple.
This also involved porting to fd-relative, which IMO makes the
code a lot clearer.
Closes: #422
Approved by: 14rcole
Dan Nicholson [Sat, 30 Jul 2016 16:00:04 +0000 (09:00 -0700)]
tests: Add test for delta with empty parts
Closes: #420
Approved by: cgwalters
Dan Nicholson [Sat, 30 Jul 2016 15:14:17 +0000 (10:14 -0500)]
deltas: Allow processing of empty delta parts
If a static delta is generated between 2 commits with the same content,
then the delta will contain 1 part with no checksums. While useless,
this is a valid delta that shouldn't raise an assertion. If the delta
part has no checksums, then there are no objects to recreate and the
processing can be skipped.
Closes: #420
Approved by: cgwalters
Giuseppe Scrivano [Wed, 27 Jul 2016 09:34:22 +0000 (11:34 +0200)]
libostree, ostree: fix usage of ostree_repo_checkout_tree_at
it was deprecated, use ostree_repo_checkout_at.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #417
Approved by: cgwalters
Giuseppe Scrivano [Fri, 29 Jul 2016 14:03:11 +0000 (16:03 +0200)]
libostree: skip introspection for two functions
These two functions are not safe for gobject introspection, so annotate
them to be skipped:
1) ostree_repo_import_archive_to_mtree
2) ostree_repo_export_tree_to_archive
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #417
Approved by: cgwalters
Giuseppe Scrivano [Wed, 27 Jul 2016 09:11:13 +0000 (11:11 +0200)]
libostree: mark ostree_repo_checkout_tree_at as deprecated
and move its definition to a separate file.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #417
Approved by: cgwalters
Giuseppe Scrivano [Wed, 27 Jul 2016 08:38:36 +0000 (10:38 +0200)]
libostree: new function ostree_repo_checkout_at
Provide a gobject introspection safe version for
`ostree_repo_checkout_tree_at'.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #417
Approved by: cgwalters
Colin Walters [Mon, 27 Jun 2016 01:59:12 +0000 (21:59 -0400)]
libglnx porting: Migrate to new tempfile code
In general this is even cleaner now, though it was better after I
extracted a helper function for the "write tempfile with contents"
bits that were shared between metadata and regular file codepaths.
Closes: #369
Approved by: jlebon
Jonathan Lebon [Fri, 29 Jul 2016 16:31:42 +0000 (12:31 -0400)]
static-delta: remove unused struct
Closes: #418
Approved by: cgwalters
Jonathan Lebon [Fri, 29 Jul 2016 14:57:44 +0000 (10:57 -0400)]
static-delta: fix command contexts
Closes: #418
Approved by: cgwalters
Colin Walters [Mon, 11 Jul 2016 13:29:18 +0000 (09:29 -0400)]
deltas: Handle untrusted checksums faster and more robustly
When reworking the ostree core [to use O_TMPFILE](https://github.com/ostreedev/ostree/pull/369),
I hit an issue in the way the untrusted delta codepath ends up trying
to re-open the file to checksum it. That's not possible with
`O_TMPFILE` since the fd (which we opened `O_WRONLY`) is the only
accessible reference to the content.
Fix this by changing the delta processing code to update a checksum as
we're doing writes, which is also faster, and ends up simplifying the
code as well.
What would be an even larger simplification here is if we e.g. used a
separate thread calling `write_object()` or something like that; the
main issue I see there is somehow bridging the fact that function
wants a `GInputStream*` but the delta code is generating stream of
writes.
Closes: #392
Approved by: jlebon
Colin Walters [Fri, 29 Jul 2016 01:06:38 +0000 (21:06 -0400)]
tests/delta-crosscheck: Add missing --from
Otherwise we generate a static delta from the *previous* and get
confused. To make doubly sure, add `--require-static-deltas` to pull.
Closes: #416
Approved by: jlebon
Colin Walters [Thu, 28 Jul 2016 13:57:48 +0000 (09:57 -0400)]
lib: Fix compiler warning from previous patch
I had this in a `fixup!` I thought.
Closes: #414
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:45:02 +0000 (15:45 -0400)]
lib: Fix leak in bootconfig parser
Pretty simple.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:40:49 +0000 (15:40 -0400)]
deploy: Fix leaks in parsing /etc/os-release
This one is a bit subtle; we're generating a hash that contains
pointers to the strings we parsed, so we need to carefully track
ownership.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:40:22 +0000 (15:40 -0400)]
sysroot: Fix a leak in deployment dirpath API
This one is pretty obvious in retrospect.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:26:11 +0000 (15:26 -0400)]
glib.supp: Suppress g_task -> thread leaks
There are variants of this, but right now because `GTask` has its
own pool which isn't necessarily cleaned up on exit, we need
to suppress all of this.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:11:17 +0000 (15:11 -0400)]
fetcher: Explicitly join thread if it's not self
This fixes a valgrind leak; see [this StackOverflow thread](http://stackoverflow.com/questions/
17642433/why-pthread-causes-a-memory-leak).
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:10:55 +0000 (15:10 -0400)]
glib.supp: Suppress worker context -> thread bits
The worker context isn't cleaned up now.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 19:00:02 +0000 (15:00 -0400)]
pull-local: Explicitly unref variant rather than relying on floating
This shows up as a leak in valgrind; the callee isn't sinking. In
general through the power of cleanup attributes we can do explicit
cleanup rather than relying on floating refs.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 18:59:33 +0000 (14:59 -0400)]
glib.supp: Suppress some dynamic type registrations too
These mirror the static ones, and we need the dynamic versions for
glib-networking -> gnutls stuff.
Closes: #410
Approved by: giuseppe
Colin Walters [Sun, 24 Jul 2016 18:54:07 +0000 (14:54 -0400)]
trivial-httpd: Fix leak of option context
Right now our valgrind runs also end up valgrinding the
`trivial-httpd` code, so while it doesn't matter, let's fix this leak
anyways. We need to avoid calling `_exit()` since that won't run the
cleanup functions.
Closes: #410
Approved by: giuseppe
Colin Walters [Fri, 22 Jul 2016 20:58:26 +0000 (16:58 -0400)]
pull: Don't execute static deltas when mirroring
We don't presently support this, since the static delta code assumes
it can just `mmap()` file objects. We could at some point implement
this, but for now just skip executing deltas when doing
`archive -> archive` mirroring.
I noticed this when trying to mirror a repo in Jenkins in
[CAHC](https://wiki.centos.org/SpecialInterestGroup/Atomic/Devel).
Closes: #408
Approved by: giuseppe
Colin Walters [Fri, 8 Jul 2016 15:26:45 +0000 (11:26 -0400)]
repo: Fix leak with ostree_repo_commit_traverse_iter_init_commit()
I noticed this using `OT_TEST_VALGRIND=1` on `test-basic.sh`.
Closes: #385
Approved by: jlebon
Jonathan Lebon [Fri, 22 Jul 2016 13:34:32 +0000 (09:34 -0400)]
libglnx: bump to latest
OSTree can sometimes print very long lines which lead to many empty
spaces getting printed if the output overflowed the line due to a bug in
libglnx.
Reported-by: Gatis Paeglis <gatis.paeglis@qt.io>
Closes: #406
Approved by: cgwalters
Colin Walters [Tue, 19 Jul 2016 14:24:18 +0000 (10:24 -0400)]
docs/formats: Elaborate a bit on delta from NULL usage
See discussion on ostree-list.
Closes: #402
Approved by: gatispaeglis
Colin Walters [Fri, 15 Jul 2016 15:17:43 +0000 (11:17 -0400)]
build: Make symlink depend on source
Closes: https://github.com/ostreedev/ostree/issues/389
Closes: #400
Approved by: smcv
Dan Nicholson [Thu, 14 Jul 2016 16:09:12 +0000 (09:09 -0700)]
core: Add allocating b64 checksum functions
The checksum_b64_inplace variants can't be used in bindings. Provide
versions that allocate and return the output rather than working on a
passed in buffer. These can then be used in GI bindings to get the
ostree modified base64 encodings.
Closes: #398
Approved by: cgwalters
Dan Nicholson [Thu, 14 Jul 2016 19:45:39 +0000 (12:45 -0700)]
lib: Fix version script node ordering
The order of the VERSION nodes is such that the new node name goes first
and the one it depends on goes after the commands. See
https://sourceware.org/binutils/docs/ld/VERSION.html.
Closes: #398
Approved by: cgwalters
Matthew Leeds [Thu, 14 Jul 2016 20:10:55 +0000 (16:10 -0400)]
README: Fix broken link
Closes: #397
Approved by: cgwalters
Giuseppe Scrivano [Thu, 14 Jul 2016 11:42:32 +0000 (13:42 +0200)]
Makefile-tests.am: make check uses the built binaries
The tests suite was failing locally as it was using the installed
version of rofiles-fuse, instead of the built one. Create the needed
symlinks in tests/ as we are already doing for the "ostree" binary.
ostree-prepare-root and ostree-remount added for completeness.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #395
Approved by: cgwalters
Colin Walters [Wed, 13 Jul 2016 15:46:16 +0000 (11:46 -0400)]
builtins/commit: Switch to using ostree_repo_write_dfd_to_mtree()
Where we're referencing local files. It's what
ostree_repo_write_directory_to_mtree() is doing internally anyways,
and I consider the `GFile*` based APIs to be generally deprecated for
the most part.
Closes: #394
Approved by: giuseppe
Colin Walters [Tue, 12 Jul 2016 13:43:32 +0000 (09:43 -0400)]
repo: Ensure we set mode for bare-user files before xattrs
When trying to switch ostree to `O_TMPFILE`, I hit the fact that
by default it uses mode `000`. It still works to write to the
open fd of course, but it *doesn't* work to set xattrs because
that code path for some reason in the kernel checks the mode bits.
This only broke for bare-user repos where we tried to set the xattr
before calling `fchmod()`, so just invert those two operations.
Closes: #391
Approved by: jlebon
Colin Walters [Mon, 11 Jul 2016 19:18:34 +0000 (15:18 -0400)]
Revert "tests/libtest.sh: Print non-matching file on failure"
This reverts commit
71301d18244a3a26a6ba6fd3934633ef94811a15.
I was confused by the fact that the non-matching content was
empty and forgot we already did print it.
Reported-by: smcv
Closes: #390
Approved by: jlebon
Colin Walters [Fri, 8 Jul 2016 14:54:11 +0000 (10:54 -0400)]
tests: Fix karg tests on ostree-booted system
https://github.com/ostreedev/ostree/pull/372 caused these tests to
start failing when the host system is managed using ostree - since the
tests *do* replace the `ostree=` kernel argument.
Closes: #384
Approved by: cgwalters
Dan Nicholson [Fri, 8 Jul 2016 20:51:36 +0000 (13:51 -0700)]
repo: Fix annotation for ostree_repo_add_gpg_signature_summary
GI needs to know this is a NULL terminated array of gchar or you'll
segfault using it from a binding.
Closes: #387
Approved by: cgwalters
Colin Walters [Fri, 8 Jul 2016 19:29:11 +0000 (15:29 -0400)]
Release 2016.7
Closes: #386
Approved by: jlebon
Colin Walters [Fri, 8 Jul 2016 17:17:33 +0000 (13:17 -0400)]
fetcher: Remove unused GTask structure member
Spotted by mbarnes.
Closes: #383
Approved by: mbarnes
Colin Walters [Fri, 8 Jul 2016 14:15:47 +0000 (10:15 -0400)]
fetcher: Clear all data for session in session thread
Conceptually the session thread owns the session, so let's clear out
everything predictably there, rather than sometimes having it happen
on the main thread.
Also, this moves up clearing the pending/outstanding queues *before*
we unreference the session, since conceptually they need to reference
it as well.
Based on a patch from: Matthew Barnes <mbarnes@redhat.com>
Closes: #383
Approved by: mbarnes
Colin Walters [Fri, 8 Jul 2016 14:01:47 +0000 (10:01 -0400)]
fetcher: Hold a ref to main context for lifetime of thread
I don't think this fixes the bug I was seeing, but it makes me more
comfortable to know we have a strong ref to the main context across
the thread lifetime, and we only unset the default right before
we go away.
If something in `thread_closure_unref()` used
`g_main_context_get_thread_default()` for example it'd be wrong
before.
Closes: #383
Approved by: mbarnes
Colin Walters [Thu, 7 Jul 2016 21:39:07 +0000 (17:39 -0400)]
tests: Add some test coverage of repeated pulls w/HTTP 500s
Systems like pulp may want to keep retrying in a loop if the server
throws a (hopefully transient) 500, and we need test coverage of
handling these errors versus our existing 404 and 206 coverage.
Closes: #383
Approved by: mbarnes
Colin Walters [Thu, 7 Jul 2016 21:36:08 +0000 (17:36 -0400)]
tests/libtest.sh: Print non-matching file on failure
We clean up the temporary directory on failure, which means it's hard
to know *why* a regex didn't match. Print it when we hit an error.
Closes: #383
Approved by: mbarnes
Mathnerd314 [Sat, 18 Jun 2016 16:23:12 +0000 (10:23 -0600)]
pull: Free fetch_data by default
This should fix the memory leaks in #352
This is a subset of the changes, the other part is in my pull code rewrite
Closes: #382
Approved by: cgwalters
Jonathan Lebon [Mon, 4 Jul 2016 16:49:49 +0000 (12:49 -0400)]
static-delta-core.c: squash unused var warning
Closes: #379
Approved by: cgwalters
Bastien Nocera [Mon, 4 Jul 2016 10:31:27 +0000 (10:31 +0000)]
libostree: Fix build failure with glib 2.42
G_DEFINE_AUTOPTR_CLEANUP_FUNC is a new function in GLib 2.44, but
libglnx contains a backported version of it. A few source files were
however using G_DEFINE_AUTOPTR_CLEANUP_FUNC either without including
libglnx.h, or without including it early enough.
This fix is similar to the one in commit
d368624.
Closes #376
Closes: #377
Approved by: smcv
Colin Walters [Thu, 30 Jun 2016 19:29:28 +0000 (15:29 -0400)]
docs: Add a section on Docker
This could have a lot more obviously, but just laying down my thoughts
as a starting point.
Closes: #374
Approved by: jlebon
Colin Walters [Fri, 1 Jul 2016 18:39:49 +0000 (14:39 -0400)]
delta: Add --if-not-exists option
I often want to have "idempotent" systems that iterate to a known
state. If after generating a commit, the system is interrupted, I'd
like the next run to still generate a delta. But we don't want to
regenerate if one exists, hence this option.
Closes: #375
Approved by: jlebon
Dan Nicholson [Mon, 27 Jun 2016 20:06:23 +0000 (13:06 -0700)]
build: Override systemd unit directory for distcheck
distcheck tests that all the files are installed under $prefix. That
doesn't work with the systemd unit directory since the path comes from
pkg-config. Override the setting to be under $prefix in that case.
Closes: #372
Approved by: cgwalters
Dan Nicholson [Fri, 13 May 2016 19:53:01 +0000 (12:53 -0700)]
tests: Improve check for /proc/cmdline kargs
On some systems there may be no root= argument, so the tests for
appending /proc/cmdline arguments will fail. Instead, loop over each of
the arguments in the host's /proc/cmdline and test that they're in the
constructed config file. That will actually test if ostree added all of
the system's /proc/cmdline args correctly. The regex isn't perfect here,
but it's probably good enough for this test.
Closes: #372
Approved by: cgwalters
Dan Nicholson [Fri, 13 May 2016 18:38:50 +0000 (11:38 -0700)]
tests: Remove extra $CMD_PREFIX from test-auto-summary.sh
$OSTREE already has $CMD_PREFIX in it, so adding it again causes you to
call env twice with LD_PRELOAD.
Closes: #372
Approved by: cgwalters
Dan Nicholson [Fri, 13 May 2016 18:01:29 +0000 (11:01 -0700)]
build: Distribute libglnx and bsdiff Makefile templates
In order to re-run autogen.sh from the tarball, the libglnx and bsdiff
Makefile templates need to be provided.
Closes: #372
Approved by: cgwalters
Dan Nicholson [Fri, 13 May 2016 17:22:02 +0000 (10:22 -0700)]
tests: Ensure mutable deployments from libostreetest
When creating sysroots with libostreetest, we don't get the benefit of
the OSTREE_SYSROOT_DEBUG setting in libtest.sh. That means we'll get
immutable deployments that can't be easily cleaned up.
Ensure the environment variable is set before creating new sysroots. It
would be nice to set the debug flags directly, but that's private API
that isn't currently pulled into libostreetest.
Closes: #372
Approved by: cgwalters
Dan Nicholson [Fri, 13 May 2016 13:47:09 +0000 (06:47 -0700)]
tests: Remove gpg verification files from EXTRA_DIST
Follow on from
70a11189. These files are already disted.
Closes: #372
Approved by: cgwalters
Jonathan Lebon [Mon, 27 Jun 2016 17:59:22 +0000 (13:59 -0400)]
ostree admin switch: fix short summary
Closes: #371
Approved by: cgwalters
Colin Walters [Sun, 26 Jun 2016 14:25:03 +0000 (10:25 -0400)]
checkout: Add an option to require hardlinks
I've seen a few people hit this and wonder why checkouts are slow/take
space. Really, ensuring this happens is the *point* of OSTree.
Physical copies should be a last resort fallback for very unusual
situations (one of those is rpm-ostree checking out the db since
librpm doesn't know how to read from libostree).
Even I hit the fact that `/var` is a mountpoint disallowing hardlinks
with `/ostree` once and was confused. =)
Add this to the rofiles-fuse test case because it creates a mount
point.
Closes: #368
Approved by: jlebon
Colin Walters [Sun, 26 Jun 2016 14:23:56 +0000 (10:23 -0400)]
rofiles-fuse: Do allow fchmod/fchown on directories
The program is called ro*files* and ostree creates physical
copies of directories, so changing them is fine.
I hit this when trying to do a copy checkout onto an rofiles-fuse
mount.
Closes: #368
Approved by: jlebon
Simon McVittie [Sun, 26 Jun 2016 12:57:13 +0000 (13:57 +0100)]
tests: fail the build if symlinking tests/ostree fails
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #367
Approved by: cgwalters
Simon McVittie [Sun, 26 Jun 2016 12:56:05 +0000 (13:56 +0100)]
tests: use our own generated libtool, not the one in $PATH
libtoolize creates a version of libtool for the right architecture
in $(top_builddir), which is guaranteed to be present, and is
guaranteed to match what we are compiling (even during
cross-compilation).
Packaging systems sometimes separate /usr/bin/libtool, which is
specific to one architecture, from the libtool development files
such as libtoolize and ltmain.sh, which are architecture-independent.
For example, in Debian, libtool_*_all.deb contains the files necessary
to libtoolize a package and is depended on by the dh-autoreconf package,
but libtool-bin_*_amd64.deb (or whatever architecture) contains
/usr/bin/libtool and is not normally necessary to depend on.
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #367
Approved by: cgwalters
Simon McVittie [Sun, 26 Jun 2016 13:26:37 +0000 (14:26 +0100)]
entry_pathname_test_helper: these tests need extended attributes
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #366
Approved by: cgwalters
Colin Walters [Fri, 24 Jun 2016 13:35:21 +0000 (09:35 -0400)]
build-sys: Make libostree-1.so depend on the symbol file
Otherwise one changing it doesn't cause a symbol to be exported.
Closes: #365
Approved by: jlebon
Alexander Larsson [Tue, 7 Jun 2016 12:38:21 +0000 (14:38 +0200)]
tests: Test partial commits for local remotes
This was broken before, fixed in the previous commit.
Closes: #324
Approved by: yuqi-zhang